<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="author" content="" />
<script type="text/javascript">   
    function doPrint() {    
        dd=window.document.body.innerHTML
        bdhtml=document.getElementById("print").innerHTML;      
        window.document.body.innerHTML=bdhtml; 
        window.print();    
        window.document.body.innerHTML=dd;//恢复
}    
</script>
<style>
    /* 去掉页眉页尾 ie可能无效 */
@page{size: 210mm 290mm​;  /* auto is the initial value */
      margin: 0mm auto; /* this affects the margin in the printer settings */
      }
</style>
</head>
<body id="print">
        <div>@page:first{margin:300px;}</div><div>@page:first{margin:300px;}</div><div>@page:first{margin:300px;}</div><div>@page:first{margin:300px;}</div>
<button type="button" onclick="doPrint()">打印</button>
</body>
</html>
	